<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>07-清浮动_03</title>
    <style>
        .container {
            width: 300px;
            position: fixed;
            border: 1px solid #000;
        }

        .box1, .box2 {
            width: 100px;
            height: 100px;
        }

        .box1 {
            background-color: #ff0;
            float: left;
        }

        .box2 {
            background-color: #f0f;
            float: right;
        }
    </style>
</head>
<body>

<!-- 让父元素成为绝对定位元素（absolute、fixed） -->

<div class="container">
    <div class="box1"></div>
    <div class="box2"></div>
</div>
<strong>123123213</strong>

</body>
</html>